import MonthInfo from "../model/MonthInfo.js"
import plugin from "../../../lib/plugins/plugin.js"
export class monthInfo extends plugin {
  constructor() {
    super({
      name: "崩坏3往世乐土",
      dsc: "崩坏3往世乐土",
      event: "message",
      priority: 100,
      rule: [
        {
          reg: "^#*崩三?(舰长手账|手账|舰长月历|月历|上月舰长手账|上月手账|上月舰长月历|上月月历)$",
          fnc: "MonthInfo",
        },
      ],
    })
  }

  async MonthInfo() {
    let data
    if (this.e.msg.includes("上月")) {
      data = await new MonthInfo().getData(this.e, false)
    } else {
      data = await new MonthInfo().getData(this.e, true)
    }
    this.renderImg("BH3-Plugin", `html/MonthInfo/MonthInfo`, data)
  }
}
